﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace MvcEngine.Core.Helpers
{
    public class DirectoryHelper : IDirectoryHelper
    {
        public static IDirectoryHelper Current 
        {
            get { return IoC.Resolve<IDirectoryHelper>(); }
        }

        #region IDirectoryHelper Members

        public bool Exists(string path)
        {
            return Directory.Exists(path);
        }

        public void CreateFolder(string path)
        {
            Directory.CreateDirectory(path);
        }

        public void CheckFolder(string path)
        {
            if (!Directory.Exists(path))
                Directory.CreateDirectory(path);
        }

        #endregion
    }
}
